package com.zgzg.shop.pay.base.dto;

import lombok.Data;

@Data
public class JwtUserDTO {
    private String username;
    private Long userId;
    private String realName;
    private String systemCode;
    private String userIp;
    private Integer userType;

    public Integer getUserType() {
        return this.isDefaultAdmin() ? 1 : this.userType == null ? 0 : this.userType;
    }


    public boolean isDefaultAdmin() {
        return "admin".equalsIgnoreCase(this.username);
    }


}